package cn.chinaunicom;

import cn.chinaunicom.domain.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 64174
 * @date 2020/2/20 0:00
 * @description
 */

public class Helloworld {
    public static void main(String[] args) {
        //1. 创建 Spring 的 IOC 容器
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        //2. 从IOC 容器中获取 bean 的实例
        Person person = (Person) applicationContext.getBean("person");
        System.out.println(person);
    }
}
